/**
 * 
 */
package com.baijia.tianxiao.route.api.impl;

import javax.annotation.Resource;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import com.baijia.tianxiao.connect.route.api.ClientMessageSendApi;
import com.baijia.tianxiao.connect.route.api.model.TianxiaoConnectSession;
import com.baijia.tianxiao.connect.route.api.model.TxMessage;
import com.baijia.tianxiao.connect.route.api.result.ClientMessageSendResult;
import com.baijia.tianxiao.route.service.ClientMessageSendService;

/**
 * @author leiruiqi
 *
 */

@Service("clientMessageSendApi")
@Slf4j
public class ClientMessageSendApiImpl implements ClientMessageSendApi {

	@Resource
	private ClientMessageSendService clientMessageSendService;
	
	@Override
	public ClientMessageSendResult sendMessage(TianxiaoConnectSession session, TxMessage txMessage) {
		log.info("ClientMessageSendApi.sendMessage excute");
		ClientMessageSendResult result = new ClientMessageSendResult();
		clientMessageSendService.messageSendSyn(session, txMessage);
		result.setSuccese(true);
		return result;
	}

}
